<template>
	<view class="profile-page">
		<!-- 个人信息卡片 -->
		<view class="profile-card">
			<view class="profile-info">
				<view class="avatar-section">
					<image class="avatar" src="/static/avatar/group.jpg" mode="aspectFill"></image>
				</view>
				<view class="user-details">
					<text class="username">我们</text>
					<text class="wechat-id">微信号：123456789</text>
					<!-- <view class="user-actions">
						<view class="action-btn status-btn">
							<text>+ 状态</text>
						</view>
						<view class="action-btn friends-btn">
							<image class="friend-avatar" src="/static/avatar/user1.png" mode="aspectFill"></image>
							<text>1个朋友</text>
							<view class="red-dot"></view>
						</view>
					</view> -->
				</view>
			</view>
		</view>
		
		<!-- 功能列表 -->
		<view class="function-section">
			<view class="function-item" v-for="item in functionList" :key="item.id">
				<view class="function-icon">
					<image :src="item.avatar" mode="aspectFill" v-if="item.avatar"></image>
				</view>
				<text class="function-name">{{ item.name }}</text>
				<view class="function-arrow">〉</view>
			</view>
		</view>
		
		<!-- 设置项 -->
		<view class="settings-section">
			<view class="setting-item">
				<view class="setting-icon">
					<image src="/static/profile/shezhi.png" mode="aspectFill"></image>
				</view>
				<text class="setting-name">设置</text>
				<view class="setting-arrow">〉</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue'

// 功能列表
const functionList = ref([
	{
		id: 1,
		name: '服务',
		avatar: '/static/profile/fuwu.png'
	},
	{
		id: 2,
		name: '收藏',
		avatar: '/static/profile/shoucang.png'
	},
	{
		id: 3,
		name: '朋友圈',
		avatar: '/static/profile/pengyouquan.png'
	},
	{
		id: 4,
		name: '卡包',
		avatar: '/static/profile/kabao.png'
	},
	{
		id: 5,
		name: '表情',
		avatar: '/static/profile/biaoqing.png'
	}
])
</script>

<style scoped>
.profile-page {
	background-color: #f7f7f7;
	height: 100vh;
}

.profile-card {
	background-color: #fff;
	margin-bottom: 10px;
	padding: 20px 16px;
}

.profile-info {
	display: flex;
	align-items: flex-start;
}

.avatar-section {
	position: relative;
	margin-right: 16px;
}

.avatar {
	width: 70px;
	height: 70px;
	border-radius: 8px;
	background-color: #e5e5e5;
}

.qr-code {
	position: absolute;
	top: -5px;
	right: -5px;
	font-size: 16px;
}

.user-details {
	flex: 1;
}

.username {
	font-size: 22px;
	font-weight: 500;
	color: #333;
	display: block;
	margin-bottom: 8px;
}

.wechat-id {
	font-size: 14px;
	color: #666;
	display: block;
	margin-bottom: 16px;
}

.user-actions {
	display: flex;
	gap: 12px;
}

.action-btn {
	padding: 6px 12px;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
	background-color: #fff;
	display: flex;
	align-items: center;
	font-size: 14px;
}

.status-btn {
	color: #333;
}

.friends-btn {
	position: relative;
	color: #333;
}

.friend-avatar {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	margin-right: 4px;
}

.red-dot {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #ff4444;
}

.function-section {
	background-color: #fff;
	margin-bottom: 10px;
}

.function-item {
	display: flex;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid #f0f0f0;
}

.function-item:last-child {
	border-bottom: none;
}

.function-icon {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 16px;
	overflow: hidden;
	background-color: #f5f5f5;
}

.function-icon image {
	width: 100%;
	height: 100%;
	display: block;
}

.function-name {
	flex: 1;
	font-size: 17px;
	color: #333;
}

.function-arrow {
	color: #ccc;
	font-size: 16px;
}

.settings-section {
	background-color: #fff;
}

.setting-item {
	display: flex;
	align-items: center;
	padding: 16px;
}

.setting-icon {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 16px;
	overflow: hidden;
	background-color: #f5f5f5;
	border-radius: 8px;
}

.setting-icon image {
	width: 100%;
	height: 100%;
	display: block;
}

.setting-name {
	flex: 1;
	font-size: 17px;
	color: #333;
}

.setting-arrow {
	color: #ccc;
	font-size: 16px;
}
</style>